<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

<html><head><title>Application Helper - Bonfire</title><link rel="stylesheet" type="text/css" href="../../styles/main.css"><script language=JavaScript src="../../javascript/main.js"></script><script language=JavaScript src="../../javascript/prettify.js"></script><script language=JavaScript src="../../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.5 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->




<div id=Content><div class="CFile"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="Application_Helper"></a>Application Helper</h1><div class=CBody><p>Pulls together various helper functions from across the core modules to ease editing and minimize physical files that need loaded.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#Application_Helper" >Application Helper</a></td><td class=SDescription>Pulls together various helper functions from across the core modules to ease editing and minimize physical files that need loaded.</td></tr><tr class="SGroup"><td class=SEntry><a href="#Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#gravatar_link" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">gravatar_link()</a></td><td class=SDescription>Creates an image link based on Gravatar for the specified email address. </td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#module_folders();" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">module_folders();</a></td><td class=SDescription>Returns an array of the folders that modules are allowed to be stored in. </td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#module_list" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">module_list()</a></td><td class=SDescription>Returns a list of all modules in the system.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#module_controller_exists" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">module_controller_exists()</a></td><td class=SDescription>Determines whether a controller exists for a module.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#module_files" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">module_files()</a></td><td class=SDescription>Returns an associative array of files within one or more modules.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gravatar_link"></a>gravatar_link()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function gravatar_link(</td><td class=PParameter nowrap>$email</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null,</td></tr><tr><td></td><td class=PParameter nowrap>$size</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>48,</td></tr><tr><td></td><td class=PParameter nowrap>$alt</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'',</td></tr><tr><td></td><td class=PParameter nowrap>$title</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'',</td></tr><tr><td></td><td class=PParameter nowrap>$class</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'',</td></tr><tr><td></td><td class=PParameter nowrap>$id</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>''</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates an image link based on Gravatar for the specified email address.&nbsp; It will default to the site&rsquo;s generic image if none is found for the user.</p><p>Note that if gravatar does not have an image that matches the criteria, it will return a link to an image under <b>your_theme/images/user.png</b>.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$email</td><td class=CDLDescription>The email address to check for.</td></tr><tr><td class=CDLEntry>$size</td><td class=CDLDescription>The width (and height) of the resulting image to grab.</td></tr><tr><td class=CDLEntry>$alt</td><td class=CDLDescription>Alt text to be put in the link tag.</td></tr><tr><td class=CDLEntry>$title</td><td class=CDLDescription>The title text to be put in the link tag.</td></tr><tr><td class=CDLEntry>$class</td><td class=CDLDescription>Any class(es) that should be assigned to the link tag.</td></tr><tr><td class=CDLEntry>$id</td><td class=CDLDescription>The id (if any) that shoudl put in the link tag.</td></tr></table><h4 class=CHeading>Return</h4><p>The resulting image tag.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="module_folders();"></a>module_folders();</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>function module_folders()</td></tr></table></blockquote><p>Returns an array of the folders that modules are allowed to be stored in.&nbsp; These are set in <b>bonfire/application/third_party/MX/Modules.php</b>.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="module_list"></a>module_list()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function module_list(</td><td class=PParameter nowrap>$exclude_core</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>false</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns a list of all modules in the system.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="module_controller_exists"></a>module_controller_exists()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function module_controller_exists(</td><td class=PParameter nowrap>$controller</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null,</td></tr><tr><td></td><td class=PParameter nowrap>$module</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Determines whether a controller exists for a module.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$controller</td><td class=CDLDescription>The name of the controller to looke for (without the .php)</td></tr><tr><td class=CDLEntry>$module</td><td class=CDLDescription>The name of module to look in.</td></tr></table><h4 class=CHeading>Return</h4><p>true/false</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="module_files"></a>module_files()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function module_files(</td><td class=PParameter nowrap>$module_name</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null,</td></tr><tr><td></td><td class=PParameter nowrap>$module_folder</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null,</td></tr><tr><td></td><td class=PParameter nowrap>$exclude_core</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>false</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns an associative array of files within one or more modules.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$module_name</td><td class=CDLDescription>If not NULL, will return only files from that module.</td></tr><tr><td class=CDLEntry>$module_folder</td><td class=CDLDescription>if not NULL, will return only files within that folder of each module (ie &lsquo;views&rsquo;)</td></tr><tr><td class=CDLEntry>$exclude_core</td><td class=CDLDescription>Whether we should ignore all core modules.</td></tr></table><h4 class=CHeading>Return</h4><p>An associative array, like: array(&lsquo;module_name&rsquo; =&gt; array(&lsquo;folder&rsquo; =&gt; array(&lsquo;file1&rsquo;, &lsquo;file2&rsquo;)))</p></div></div></div>

</div><!--Content-->


<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->


<div id=Menu><div class=MTitle>Bonfire<div class=MSubTitle>Faster CodeIgniter Development</div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Guides</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MFile><a href="../../files2/installing-txt.html">Installing Bonfire</a></div></div><div class=MEntry><div class=MFile><a href="../../files2/modules/overview-txt.html">Modules Overview</a></div></div><div class=MEntry><div class=MFile><a href="../../files2/auth_notes-txt.html">Understanding Authentication</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent2')">Helpers</a><div class=MGroupContent id=MGroupContent2><div class=MEntry><div class=MFile><a href="address_helper-php.html">Address Helper</a></div></div><div class=MEntry><div class=MFile id=MSelected>Application Helper</div></div><div class=MEntry><div class=MFile><a href="config_file_helper-php.html">Config File Helper</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent3')">Libraries</a><div class=MGroupContent id=MGroupContent3><div class=MEntry><div class=MFile><a href="../libraries/assets-php.html">Assets</a></div></div><div class=MEntry><div class=MFile><a href="../libraries/template-php.html">Template</a></div></div><div class=MEntry><div class=MFile><a href="../core_modules/users/libraries/auth-php.html">Auth</a></div></div><div class=MEntry><div class=MFile><a href="../libraries/Console-php.html">Console</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent4')">Core Overrides</a><div class=MGroupContent id=MGroupContent4><div class=MEntry><div class=MFile><a href="../core/MY_Controller-php.html">Controllers</a></div></div><div class=MEntry><div class=MFile><a href="../core/MY_Model-php.html">MY_Model</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent5')">Core Modules</a><div class=MGroupContent id=MGroupContent5><div class=MEntry><div class=MFile><a href="../core_modules/emailer/libraries/emailer-php.html">Emailer</a></div></div><div class=MEntry><div class=MFile><a href="../core_modules/migrations/libraries/Migrations-php.html">Migrations</a></div></div><div class=MEntry><div class=MFile><a href="../core_modules/roles/models/permission_model-php.html">Permission_model</a></div></div><div class=MEntry><div class=MFile><a href="../core_modules/roles/models/role_model-php.html">Role_model</a></div></div></div></div></div><div class=MEntry><div class=MFile><a href="../controllers/install-php.html">controllers/<wbr>install.php</a></div></div><div class=MEntry><div class=MFile><a href="../core_modules/logs/controllers/developer-php.html">core_modules/.../controllers/<wbr>developer.php</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent6')">Index</a><div class=MGroupContent id=MGroupContent6><div class=MEntry><div class=MIndex><a href="../../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Variables.html">Variables</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Files.html">Files</a></div></div></div></div></div><script type="text/javascript"><!--
var searchPanel = new SearchPanel("searchPanel", "HTML", "../../search");
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option  id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Files">Files</option><option value="Functions">Functions</option><option value="Variables">Variables</option></select></div><script language=JavaScript><!--
HideAllBut([2, 3, 1, 4, 5], 7);// --></script></div><!--Menu-->



<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function gravatar_link(</td><td class=PParameter nowrap>$email</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null,</td></tr><tr><td></td><td class=PParameter nowrap>$size</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>48,</td></tr><tr><td></td><td class=PParameter nowrap>$alt</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'',</td></tr><tr><td></td><td class=PParameter nowrap>$title</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'',</td></tr><tr><td></td><td class=PParameter nowrap>$class</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'',</td></tr><tr><td></td><td class=PParameter nowrap>$id</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>''</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Creates an image link based on Gravatar for the specified email address. </div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>function module_folders()</td></tr></table></blockquote>Returns an array of the folders that modules are allowed to be stored in. </div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function module_list(</td><td class=PParameter nowrap>$exclude_core</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>false</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Returns a list of all modules in the system.</div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function module_controller_exists(</td><td class=PParameter nowrap>$controller</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null,</td></tr><tr><td></td><td class=PParameter nowrap>$module</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Determines whether a controller exists for a module.</div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function module_files(</td><td class=PParameter nowrap>$module_name</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null,</td></tr><tr><td></td><td class=PParameter nowrap>$module_folder</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null,</td></tr><tr><td></td><td class=PParameter nowrap>$exclude_core</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>false</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Returns an associative array of files within one or more modules.</div></div><!--END_ND_TOOLTIPS-->




<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>


<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>